-
Notifications
You must be signed in to change notification settings - Fork 224
8301793: AlgorithmId should not encode a missing parameters field as NULL unless hardcoded #3615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
8301793: AlgorithmId should not encode a missing parameters field as NULL unless hardcoded #3615
Conversation
👋 Welcome back varadam! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
This backport pull request has now been updated with issue from the original commit. |
/approval 8301793 request the backport fix where the AlgorithmId should omit the parameters field when it is not required, rather than encoding it as NULL, unless the algorithm explicitly mandates. JTREG testing successful for sun/security |
@varada1110 |
Hi Varada, |
Hi @seanjmullan , |
@varada1110 I'm not actively participating in this project. You will need to find another Reviewer. |
You might ask @weijun, who fixed the original issue. |
Hi @wangweij, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me. Sorry for the late review.
|
Thank you @wangweij for the review |
@varada1110 |
Hi @varada1110 |
Hi @GoeLin , |
In the case of ML-KEM and ML-DSA keys there are no algorithm parameters. So, this code adds a NULL to the encoding when it shouldn't. The issue in jdk17 is when you are trying to compare keys to make sure that they are equal between providers. However, the equals method makes use of the encoding to do the compare which will fail.
The fix for this was already there in JDK 21 and later.
The backport could not be done as a clean cherry-pick because I had manually remove the old logic that adds a NULL when the OID isn't in the list, and replaced it with equivalent behavior that only adds a NULL when required.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/3615/head:pull/3615
$ git checkout pull/3615
Update a local copy of the PR:
$ git checkout pull/3615
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/3615/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3615
View PR using the GUI difftool:
$ git pr show -t 3615
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/3615.diff
Using Webrev
Link to Webrev Comment